package org.jadestudio.dsdown.action;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import org.jadestudio.dsdown.service.ManageLoginService;
import org.jadestudio.dsdown.util.ImageConverter;
import org.jadestudio.dsdown.util.ImageCut;
import org.jadestudio.dsdown.util.SysInfo;
import org.springframework.stereotype.Component;

import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.TaobaokeItemsGetRequest;
import com.taobao.api.response.TaobaokeItemsGetResponse;

/****
 * @author sima
 *
 */
@Component(value="/jadestudio/common")
public class CommonAction extends DispatchAction {
	@Resource
	private ManageLoginService manageLoginService;
	public CommonAction(){}
	private static final long serialVersionUID = 1L;
	public static final String IMGROOT = "/"+SysInfo.uploadFolderName+"/";
	private static String baseFileDir = File.separator + SysInfo.uploadFolderName + File.separator;//上传文件存储目录
	private static String baseURLDir = "/"+SysInfo.uploadFolderName+"/";//上传文件目录URL
	private static String fileExt = "jpg,jpeg,bmp,gif,png";
	private static Long maxSize = 0l;
	private static String dirType = "1";// 0:不建目录 1:按天存入目录 2:按月存入目录 3:按扩展名存目录 建议使用按天存
	
	/**
	 * 地址转向
	 * @param request
	 * @param mapping
	 * @param flag 是否检测  1带检测session / 0不带检测session
	 * @param actionforwardName action地址名字
	 * @return
	 */
	private ActionForward gotoForward(HttpServletRequest request,ActionMapping mapping,int flag,String actionforwardName){
		if(flag==1){
			int sessionFlag=manageLoginService.userSessionRecheck(request);
			if(sessionFlag==0){
			    ActionForward forward = new ActionForward("/jadestudio/portal.do");
				forward.setRedirect(true);
				return forward;
			}else{
				return mapping.findForward(actionforwardName);
			}
		}else{
			return mapping.findForward(actionforwardName);
		}
	}
	
	/**
	 * 引导至上传界面
	 */
	public ActionForward gotoUpload(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
		return this.gotoForward(request,mapping,1,"gotoUpload");
	}
	
	/**
	 * 图片上传组件上传
	 */
	public ActionForward imgUpload(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
		int sessionFlag=manageLoginService.userSessionRecheck(request);
		if(sessionFlag==0){
		    ActionForward forward = new ActionForward("/jadestudio/portal.do");
			forward.setRedirect(true);
			return forward;
		}
		
		request.setCharacterEncoding("utf-8");
		System.out.println("**************图片上传*******************");
		SimpleDateFormat formatter2 = new SimpleDateFormat("yyyyMMdd");
		String contentName=formatter2.format(new Date());
		
		String userWebAppPath = getWebAppPath(contentName);
		/*检查是否有图片上传文件夹*/
		checkImageDir(userWebAppPath);	
		
		/*图片上传的相对路径*/
		String imgUploadPath = null;
		String imgWebAppPath = null;
		/*图片后缀*/
		String imgFileExt = null;
		
		/*图片名称:以当前日期*/
		SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddhhmmss");
		String imgFileId = formatter.format(new Date());
		
		/*图片初始化高度与宽度*/
		String width = null;
		String height = null;
		
		int imgWidth = 0;
		int imgHeight = 0;

		try {
			
			com.jspsmart.upload.SmartUpload smartUpload = new com.jspsmart.upload.SmartUpload();
			smartUpload.initialize(this.getServlet().getServletConfig(), request, response);
			smartUpload.upload("utf-8");
			com.jspsmart.upload.Request rqest = smartUpload.getRequest();
			
			//指定图片宽度和高度
			width = rqest.getParameter("width");
			if(null == width){
				width = "700";
			}
			height= rqest.getParameter("height");	
			if(null == height){
				height = "600";
			}
			
			imgWidth = Integer.parseInt(width);
			imgHeight = Integer.parseInt(height);
			
			
			//文件个数
			int fileCounts =  smartUpload.getFiles().getCount();	
		
			for (int i = 0; i <fileCounts; i++) {
				com.jspsmart.upload.File myFile = smartUpload.getFiles().getFile(i);
				if (!myFile.isMissing()) {
					
					imgFileExt = myFile.getFileExt();
					//组装图片真实名称
					imgFileId += i + System.currentTimeMillis() + "." + imgFileExt;
					
					//图片生成路径
					imgWebAppPath = userWebAppPath + imgFileId;
					
					//生成图片文件
					myFile.saveAs(imgWebAppPath);
					
					//图片的相对路径
					imgUploadPath = IMGROOT + contentName+"/" + imgFileId;
					
					//检查图片大小
					BufferedImage src = ImageIO.read(new File(imgWebAppPath)); // 读入文件						 
					int imgSrcWidth = src.getWidth(); // 得到源图宽							 
					//重新指定大小
					imgWidth = imgSrcWidth > imgWidth ? imgWidth : imgSrcWidth;
					
					int imgSrcHeight = src.getHeight(); // 得到源图长
					imgHeight = imgSrcHeight > imgHeight ? imgHeight : imgSrcHeight;
				
					//按照图片的设置大小生成
					ImageCut.scale(imgWebAppPath, imgWebAppPath,imgWidth,imgHeight);
					 File f = new File(imgWebAppPath);								
					 if(f.exists()){			
						 System.out.println("创建"+imgWidth+"*"+imgHeight+"图片成功");
					 }					
				}
				
			}
			
		}catch(Exception ex){
			ex.printStackTrace();
		}
		
		String path = "/WEB-INF/content/manage/common/imgcrop.jsp?tag=0&oldImgPath="+imgUploadPath+"&imgFileExt="+imgFileExt+"&imgRoot="+IMGROOT+"&width="+imgWidth+"&height="+imgHeight;
		System.out.println("Path: "+path);
		System.out.println("**************图片上传完成*******************");
		request.getRequestDispatcher(path).forward(request,response);
		return null;
	}
	
	/**
	 * 图片裁剪
	 * @return
	 */
	public ActionForward imgCrop(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
	int sessionFlag=manageLoginService.userSessionRecheck(request);
	if(sessionFlag==0){
	    ActionForward forward = new ActionForward("/jadestudio/portal.do");
		forward.setRedirect(true);
		return forward;
	}	
	System.out.println("*************图片裁剪***************");
	System.out.println("x: " + request.getParameter("x") + "," + request.getParameter("y") + "," + request.getParameter("w") + "," + request.getParameter("h"));
	// 用户经过剪辑后的图片的大小
	Integer x = Integer.parseInt(request.getParameter("x"));
	Integer y = Integer.parseInt(request.getParameter("y"));
	Integer w = Integer.parseInt(request.getParameter("w"));
	Integer h = Integer.parseInt(request.getParameter("h"));
	
	//获取原显示图片路径
	String oldImgPath = request.getParameter("oldImgPath");
	//图片后缀
	String imgFileExt = request.getParameter("imgFileExt");
	String imgRoot =  request.getParameter("imgRoot");
	
	Integer width = Integer.parseInt(request.getParameter("width"));
	Integer height = Integer.parseInt(request.getParameter("height"));
	
	//WEB应用程序根路径
	String webAppPath = this.getServlet().getServletContext().getRealPath("/");
	
	/*图片名称:以当前日期*/
	SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddhhmmss");
	String imgFileId = formatter.format(new Date());
	String imgName =  imgRoot + imgFileId + System.currentTimeMillis() + "." + imgFileExt;		
	
	//组装图片真实名称
	String createImgPath = webAppPath + imgName;
	
	//之前上传的图片路径
	webAppPath += oldImgPath;
	
	System.out.println("原图片路径: " + webAppPath + ",新图片路径: " + createImgPath);
	
	//进行剪切图片操作
	ImageCut.abscut(webAppPath, createImgPath, x,y,w, h);
	
	 File f = new File(createImgPath);								
	 if(f.exists()){						
		 System.out.println("剪切图片大小: "+w+"*"+h+"图片成功!");
	 }	
	 
	String path = "/WEB-INF/content/manage/common/imgcrop.jsp?tag=1&oldImgPath="+oldImgPath+"&imgFileExt="+imgFileExt+"&imgRoot="+imgRoot + "&imgName="+imgName+"&height=" + height + "&width=" + width;
	System.out.println("imgCrop: " + path);
	System.out.println("*************图片裁剪完成***************");
	request.getRequestDispatcher(path).forward(request,response);
	return null;
	}
	
	/**
	 * 传入目录名
	 * @param contentName
	 * @return
	 */
	private String getWebAppPath(String contentName){
		String webAppPath = this.getServlet().getServletContext().getRealPath("/");		
		String userWebAppPath = webAppPath+IMGROOT+contentName+"/";
		return userWebAppPath;
	}

	private void checkImageDir(String userWebAppPath) {		
		 File file = new File(userWebAppPath);
		 if(!file.exists()){
			 file.mkdir();
		 }
	}
	

/***************************************************************************************************	
	配合COMMONUPLOAD的上传方法（文章编辑时调用）
***************************************************************************************************/
	private void initUpload() throws ServletException {
		/*获取文件上传存储的相当路径*/
		if (!StringUtils.isBlank(this.getServlet().getInitParameter("baseDir"))){
			baseFileDir = this.getServlet().getInitParameter("baseDir");
		}
		
		String realBaseDir = this.getServlet().getServletConfig().getServletContext().getRealPath(baseFileDir);
		File baseFile = new File(realBaseDir);
		if (!baseFile.exists()) {
			baseFile.mkdir();
		}

		/*获取文件类型参数*/
		fileExt = this.getServlet().getInitParameter("fileExt");
		if (StringUtils.isBlank(fileExt)) fileExt = "jpg,jpeg,gif,bmp,png";

		/*获取文件大小参数*/
		String maxSize_str = this.getServlet().getInitParameter("maxSize");
		if (StringUtils.isNotBlank(maxSize_str)) maxSize = new Long(maxSize_str);
		
		/*获取文件目录类型参数*/
		dirType = this.getServlet().getInitParameter("dirType");
		
		if (StringUtils.isBlank(dirType))
			dirType = "1";
		if (",0,1,2,3,".indexOf("," + dirType + ",") < 0)
			dirType = "1";
	}

	/**
	 * 上传文件数据处理过程
	 */
	@SuppressWarnings({"unchecked" })
	public ActionForward imgUpload2(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
		int sessionFlag=manageLoginService.userSessionRecheck(request);
		if(sessionFlag==0){
		    ActionForward forward = new ActionForward("/jadestudio/portal.do");
			forward.setRedirect(true);
			return forward;
		}
		/*初始化*/
		this.initUpload();
		
		response.setContentType("text/html; charset=UTF-8");
		response.setHeader("Cache-Control", "no-cache");
		String err = "";
		String newFileName = "";
		String newScareName="";
		FileItemFactory factory = new DiskFileItemFactory();
		ServletFileUpload upload = new ServletFileUpload(factory);
		try {
			
			List<FileItem> items = upload.parseRequest(request);
			Map<String, Serializable> fields = new HashMap<String, Serializable>();
			Iterator<FileItem> iter = items.iterator();
			
			while (iter.hasNext()) {
				FileItem item = (FileItem) iter.next();
				if (item.isFormField())
					fields.put(item.getFieldName(), item.getString());
				else
					fields.put(item.getFieldName(), item);
			}
			
			/*获取表单的上传文件*/
			FileItem uploadFile = (FileItem)fields.get("filedata");
			
			/*获取文件上传路径名称*/
			String fileNameLong = uploadFile.getName();
			System.out.println("fileNameLong:" + fileNameLong);
			
			/*获取文件扩展名*/
			/*索引加1的效果是只取xxx.jpg的jpg*/
			String extensionName = fileNameLong.substring(fileNameLong.lastIndexOf(".") + 1);
			System.out.println("extensionName:" + extensionName);
			
			/*检查文件类型*/
			if (("," + fileExt.toLowerCase() + ",").indexOf("," + extensionName.toLowerCase() + ",") < 0){
				printInfo(response, "不允许上传此类型的文件", "","");
				return null;
			}
			/*文件是否为空*/
			if (uploadFile.getSize() == 0){
				printInfo(response, "上传文件不能为空", "","");
				return null;
			}
			/*检查文件大小*/
			if (maxSize > 0 && uploadFile.getSize() > maxSize){
				printInfo(response, "上传文件的大小超出限制", "","");
				return null;
			}
			
			//0:不建目录, 1:按天存入目录, 2:按月存入目录, 3:按扩展名存目录.建议使用按天存.
			String fileFolder = "";
			if (dirType.equalsIgnoreCase("1"))
				fileFolder = new SimpleDateFormat("yyyyMMdd").format(new Date());;
			if (dirType.equalsIgnoreCase("2"))
				fileFolder = new SimpleDateFormat("yyyyMM").format(new Date());
			if (dirType.equalsIgnoreCase("3"))
				fileFolder = extensionName.toLowerCase();
			
			/*文件存储的相对路径*/
			String saveDirPath = baseFileDir + fileFolder + "/";
			System.out.println("saveDirPath:" + saveDirPath);
			
			/*文件存储在容器中的绝对路径*/
			String saveFilePath = this.getServlet().getServletConfig().getServletContext().getRealPath("") + baseFileDir + fileFolder + "/";
			System.out.println("saveFilePath:" + saveFilePath);
			
			/*构建文件目录以及目录文件*/
			File fileDir = new File(saveFilePath);
			if (!fileDir.exists()) {fileDir.mkdirs();}
			
			/*重命名文件*/
			String filename = UUID.randomUUID().toString();
			File savefile = new File(saveFilePath + filename + "." + extensionName);
			
			/*存储上传文件*/
			System.out.println(upload == null);
			uploadFile.write(savefile);
			
			String projectBasePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();
			newFileName = projectBasePath + baseURLDir + fileFolder + "/" + filename + "." + extensionName;		
			System.out.println("newFileName:" + newFileName);
			
			String absoluteFilePath=saveFilePath+filename+"."+extensionName;
			System.out.println("absoluteFilePath:" + absoluteFilePath);
			
			/*生成缩略图*/
			ImageConverter.testNoScale(absoluteFilePath, SysInfo.maxPicScaredWidth, SysInfo.maxPicScaredHeight);
			newScareName= projectBasePath + baseURLDir + fileFolder + "/" +"_SCALE__WH_" +filename + "." + extensionName;
			
		} catch (Exception ex) {
			System.out.println(ex.getMessage());
			newFileName = "";
			err = "错误: " + ex.getMessage();
		}
		printInfo(response, err, newFileName,newScareName);
		return null;
	}
	
	/**
	 * 使用I/O流输出 json格式的数据
	 * @param response
	 * @param err
	 * @param newFileName
	 * @throws IOException
	 */
	private void printInfo(HttpServletResponse response, String err, String newFileName,String newScareName) throws IOException {
		PrintWriter out = response.getWriter();
		//String filename = newFileName.substring(newFileName.lastIndexOf("/") + 1);
		out.println("{\"err\":\"" + err + "\",\"msg\":\"" + newFileName+ "\"}");
		out.flush();
		out.close();
	}
	
	
	/**
	 * 文本中的上传文件本地化
	 */
	@SuppressWarnings({"unchecked" })
	public ActionForward imgUpload3(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
		int sessionFlag=manageLoginService.userSessionRecheck(request);
		if(sessionFlag==0){
		    ActionForward forward = new ActionForward("/jadestudio/portal.do");
			forward.setRedirect(true);
			return forward;
		}
		String url = request.getParameter("urls");
		String fileAddress="";
		if(url.indexOf("|")!=-1){
			String[] urls=url.split("\\|");
			for(int t=0;t<urls.length;t++){
				fileAddress+=(copyFileFromUrl(urls[t],request)+"|");
			}
			fileAddress = fileAddress.substring(0, fileAddress.length()-1);
			PrintWriter pw = response.getWriter();
			pw.write(fileAddress);
		}else{
			fileAddress=copyFileFromUrl(url,request);
			PrintWriter pw = response.getWriter();
			pw.write(fileAddress);
		}
		return null;
		
	}
	
	/***
	 * 拷贝网络图片到本地
	 * @param url
	 */
	public String copyFileFromUrl(String url,HttpServletRequest request){
		URL httpurl=null;
		try {
			httpurl = new URL(url);
			String fileFolder = new SimpleDateFormat("yyyyMMdd").format(new Date());
			/*构建文件目录以及目录文件*/
			String saveFilePath =this.getServlet().getServletConfig().getServletContext().getRealPath("") + baseFileDir + fileFolder + "/";
			File fileDir = new File(saveFilePath);
			if (!fileDir.exists()) {
				fileDir.mkdirs();
			}
			String extensionName="";
			if(url!=null && !url.equals("")){
				extensionName = url.substring(url.lastIndexOf(".")+1);
			}
			/*重命名文件*/
			System.out.println("预备下载网络图片");
			String filename = UUID.randomUUID().toString();//文件名
			String fileLocalAddress=saveFilePath + filename + "." + extensionName;//文件本地路径
			String path = request.getContextPath();
			String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
			String fileRemoteAddress=basePath+IMGROOT + fileFolder + "/"+filename + "." + extensionName;//文件远程地址
			System.out.println("文件名:"+filename);
			System.out.println("文件本地路径:"+fileLocalAddress);
			System.out.println("文件远程地址:"+fileRemoteAddress);
			System.out.println("------------------------------");
			File savefile = new File(fileLocalAddress);
			try {
				FileUtils.copyURLToFile(httpurl, savefile);
				return fileRemoteAddress;
			} catch (IOException e) {
				System.out.println("拷贝网络路径图片失败");
				e.printStackTrace();
			}
		} catch (MalformedURLException e1) {
			System.out.println("无法访问url路径的图片");
			System.out.println("原因:"+e1.getMessage());
			//e1.printStackTrace();
		}
		return "";
	}
	
	/**
	 * 返回淘宝结果
	 * @param isOk
	 * @param msg
	 * @param gameList
	 * @return
	 */
	public String returnTaoBaoResult(String isOk,String msg,String body){
		//string[]
		//0 商品名
		//1 商品地址
		//2 商品价格
		//3 图片地址
		//4 商铺名
		//5 商铺地址
		//6 佣金量
		//7 月销量
		//8 月推广量
		StringBuffer sb = new StringBuffer();
		sb.append("{");
		sb.append("\"isOK\": \""+isOk+"\",");
		sb.append("\"msg\": \""+msg+"\""); 
		if(body!=null && !"".equals(body)){
			sb.append(",");
			body=body.substring(1,body.length()-1);
			sb.append(body);	
		}
		/*if(gameList!=null && gameList.size()>0 ){
		sb.append(" \"data\": [ ");
		String tmpList="";
		for(int t=0;t<gameList.size();t++){
			tmpList+=" {\"itm0\":\""+gameList.get(t)[0]+"\", \"itm1\": \""+gameList.get(t)[1]+"\",\"itm2\": \""+gameList.get(t)[2]+"\",\"itm3\": \""+gameList.get(t)[3]+"\",\"itm4\": \""+gameList.get(t)[4]+"\",\"itm5\": \""+gameList.get(t)[5]+"\",\"itm6\": \""+gameList.get(t)[6]+"\",\"itm7\": \""+gameList.get(t)[7]+"\",\"itm8\": \""+gameList.get(t)[8]+"\" },  ";
		}
		tmpList.substring(0,tmpList.length()-1);
		sb.append("]");	
		}*/
	    sb.append("}");
	    return sb.toString();
	}
	
	/**
	 * 从淘宝中获取商铺商品推广链接
	 */
	@SuppressWarnings({"unchecked"})
	public ActionForward getGameFromTaoBao(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response) throws Exception{
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		int sessionFlag=manageLoginService.userSessionRecheck(request);
		if(sessionFlag==0){
			PrintWriter out = response.getWriter();
			out.println(returnTaoBaoResult("0","丢失Session",null));
			out.flush();
			out.close();
			return null;
		}
		String taobaoApiListSelect = request.getParameter("taobaoApiList_select");//搜索条件
		String taobaoApiListSearchName = request.getParameter("taobaoApiList_searchName");//搜索名称
		String taobaoStartPrice = request.getParameter("taobaoApiList_startPrice");//开始价格
		String taobaoEndPrice = request.getParameter("taobaoApiList_endPrice");//结束价格
		
		taobaoApiListSearchName = java.net.URLDecoder.decode(taobaoApiListSearchName,"UTF-8");  
		String url=SysInfo.appUrl;
		String appkey=SysInfo.appKey;
		String secret=SysInfo.appSecret;
		TaobaoClient client=new DefaultTaobaoClient(url, appkey, secret);
		TaobaokeItemsGetRequest req=new TaobaokeItemsGetRequest();
		req.setFields("num_iid,title,nick,pic_url,price,click_url,commission,commission_rate,commission_num,commission_volume,shop_click_url,seller_credit_score,item_location,volume");
		req.setPid(Long.parseLong(SysInfo.appPid));
		req.setKeyword(taobaoApiListSearchName);
		req.setStartPrice(taobaoStartPrice);
		req.setEndPrice(taobaoEndPrice);
		int sort = Integer.valueOf(taobaoApiListSelect);
		String _tmp_sort="";
        switch (sort) { 
            case 0:
                _tmp_sort = "price_desc";
                break;
            case 1:
                _tmp_sort = "price_asc";
                break;
            case 2:
                _tmp_sort = "credit_desc";
                break;
            case 3:
                _tmp_sort = "commissionRate_desc";
                break;
            case 4:
                _tmp_sort = "commissionRate_asc";
                break;
            case 5:
                _tmp_sort = "commissionNum_desc";
                break;
            case 6:
                _tmp_sort = "commissionNum_asc";
                break;
            case 7:
                 _tmp_sort = "commissionVolume_desc";
                break;
            case 8:
                  _tmp_sort = "commissionVolume_asc";
                break;
            case 9:
                _tmp_sort = "delistTime_desc";
                break;
            case 10:
                _tmp_sort = "delistTime_asc";
                break;
            default:
                _tmp_sort = "commissionNum_desc";
                break;
        }
        req.setSort(_tmp_sort);
        req.setPageNo(1L);
        req.setPageSize(40L);
		TaobaokeItemsGetResponse TaobaokeResponse = client.execute(req);
		
		
		int size=TaobaokeResponse.getTaobaokeItems()!=null?TaobaokeResponse.getTaobaokeItems().size():0;
		PrintWriter out = response.getWriter();
		if(size>0){
			out.println(returnTaoBaoResult("1","成功读取",TaobaokeResponse.getBody()));
		}else{
			out.println(returnTaoBaoResult("0","无结果",null));
		}
		out.flush();
		out.close();
		
		
		return null;
	}
	
	
	
	
	
	
	
	
	
	
}

